package com.kitty.record.kittyjava.javabase;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;

/**
 * @author shenshen.qian@amh-group.com
 * @version 0.0.1
 * @date 2021/12/27 21:31
 */
public class Test {


    public static void main(String[] args) {

        Dog dog = new Dog("A");

        System.out.println("1-"+dog.toString());
        dog = new Dog("B");
        //dog = func(dog);
        System.out.println("5-"+dog.toString());
        System.out.println("6-"+dog.getName());


    }

    private static Dog func(Dog dog) {
        System.out.println("2-"+dog.toString());
        dog = new Dog("B");
        System.out.println("3-"+dog.toString());
        System.out.println("4-"+dog.getName());
        return dog;
    }


    @AllArgsConstructor
    @Data
    @ToString(callSuper = true,includeFieldNames = false)
    public static class Dog{
        private String name;
    }


}
